\(\int \frac {\cot ^4(e+f x)}{(a+b \tan ^2(e+f x))^2} \, dx\) [235]
Optimal result
Integrand size = 23, antiderivative size = 169 \[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {x}{(a-b)^2}-\frac {(7 a-5 b) b^{5/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} (a-b)^2 f}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}
\]
[Out]
x/(a-b)^2-1/2*(7*a-5*b)*b^(5/2)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))/a^(7/2)/(a-b)^2/f+1/2*(2*a^2+2*a*b-5*b^2)*c
ot(f*x+e)/a^3/(a-b)/f-1/6*(2*a-5*b)*cot(f*x+e)^3/a^2/(a-b)/f-1/2*b*cot(f*x+e)^3/a/(a-b)/f/(a+b*tan(f*x+e)^2)
Rubi [A] (verified)
Time = 0.34 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of
steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 483, 597, 536, 209, 211}
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {b^{5/2} (7 a-5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} f (a-b)^2}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 f (a-b)}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 f (a-b)}-\frac {b \cot ^3(e+f x)}{2 a f (a-b) \left (a+b \tan ^2(e+f x)\right )}+\frac {x}{(a-b)^2}
\]
[In]
Int[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^2,x]
[Out]
x/(a - b)^2 - ((7*a - 5*b)*b^(5/2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(2*a^(7/2)*(a - b)^2*f) + ((2*a^2 +
2*a*b - 5*b^2)*Cot[e + f*x])/(2*a^3*(a - b)*f) - ((2*a - 5*b)*Cot[e + f*x]^3)/(6*a^2*(a - b)*f) - (b*Cot[e +
f*x]^3)/(2*a*(a - b)*f*(a + b*Tan[e + f*x]^2))
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 483
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*(e*
x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*e*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a*d)
*(p + 1)), Int[(e*x)^m*(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*b*(m + 1) + n*(b*c - a*d)*(p + 1) + d*b*(m + n
*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && LtQ
[p, -1] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]
Rule 536
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]
Rule 597
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*c*g*(m + 1))), x] + Dist[1/(a*c*
g^n*(m + 1)), Int[(g*x)^(m + n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + n + 1) - e
*n*(b*c*p + a*d*q) - b*e*d*(m + n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] &&
IGtQ[n, 0] && LtQ[m, -1]
Rule 3751
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
:> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
+ ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))
Rubi steps \begin{align*}
\text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f} \\ & = -\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {2 a-5 b-5 b x^2}{x^4 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 a (a-b) f} \\ & = -\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}-\frac {\text {Subst}\left (\int \frac {3 \left (2 a^2+2 a b-5 b^2\right )+3 (2 a-5 b) b x^2}{x^2 \left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{6 a^2 (a-b) f} \\ & = \frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {3 \left (2 a^3+2 a^2 b+2 a b^2-5 b^3\right )+3 b \left (2 a^2+2 a b-5 b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{6 a^3 (a-b) f} \\ & = \frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b)^2 f}-\frac {\left ((7 a-5 b) b^3\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{2 a^3 (a-b)^2 f} \\ & = \frac {x}{(a-b)^2}-\frac {(7 a-5 b) b^{5/2} \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{2 a^{7/2} (a-b)^2 f}+\frac {\left (2 a^2+2 a b-5 b^2\right ) \cot (e+f x)}{2 a^3 (a-b) f}-\frac {(2 a-5 b) \cot ^3(e+f x)}{6 a^2 (a-b) f}-\frac {b \cot ^3(e+f x)}{2 a (a-b) f \left (a+b \tan ^2(e+f x)\right )} \\
\end{align*}
Mathematica [A] (verified)
Time = 3.99 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.81
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\frac {\frac {3 b^{5/2} (-7 a+5 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{a^{7/2} (a-b)^2}-\frac {2 \cot (e+f x) \left (-4 a-6 b+a \csc ^2(e+f x)\right )}{a^3}+\frac {3 \left (2 (e+f x)-\frac {(a-b) b^3 \sin (2 (e+f x))}{a^3 (a+b+(a-b) \cos (2 (e+f x)))}\right )}{(a-b)^2}}{6 f}
\]
[In]
Integrate[Cot[e + f*x]^4/(a + b*Tan[e + f*x]^2)^2,x]
[Out]
((3*b^(5/2)*(-7*a + 5*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/(a^(7/2)*(a - b)^2) - (2*Cot[e + f*x]*(-4*a -
6*b + a*Csc[e + f*x]^2))/a^3 + (3*(2*(e + f*x) - ((a - b)*b^3*Sin[2*(e + f*x)])/(a^3*(a + b + (a - b)*Cos[2*(
e + f*x)]))))/(a - b)^2)/(6*f)
Maple [A] (verified)
Time = 0.26 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.75
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}-\frac {b^{3} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (7 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3} \left (a -b \right )^{2}}-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {-2 b -a}{a^{3} \tan \left (f x +e \right )}}{f}\) |
\(126\) |
default |
\(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{\left (a -b \right )^{2}}-\frac {b^{3} \left (\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (f x +e \right )}{a +b \tan \left (f x +e \right )^{2}}+\frac {\left (7 a -5 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{2 \sqrt {a b}}\right )}{a^{3} \left (a -b \right )^{2}}-\frac {1}{3 a^{2} \tan \left (f x +e \right )^{3}}-\frac {-2 b -a}{a^{3} \tan \left (f x +e \right )}}{f}\) |
\(126\) |
risch |
\(\frac {x}{a^{2}-2 a b +b^{2}}+\frac {i \left (12 a^{4} {\mathrm e}^{8 i \left (f x +e \right )}-24 a^{3} b \,{\mathrm e}^{8 i \left (f x +e \right )}+21 a \,b^{3} {\mathrm e}^{8 i \left (f x +e \right )}-15 b^{4} {\mathrm e}^{8 i \left (f x +e \right )}+12 a^{4} {\mathrm e}^{6 i \left (f x +e \right )}+12 a^{3} b \,{\mathrm e}^{6 i \left (f x +e \right )}-12 a^{2} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-54 a \,b^{3} {\mathrm e}^{6 i \left (f x +e \right )}+60 b^{4} {\mathrm e}^{6 i \left (f x +e \right )}-4 a^{4} {\mathrm e}^{4 i \left (f x +e \right )}-60 a^{3} b \,{\mathrm e}^{4 i \left (f x +e \right )}+60 a^{2} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+76 a \,b^{3} {\mathrm e}^{4 i \left (f x +e \right )}-90 b^{4} {\mathrm e}^{4 i \left (f x +e \right )}+4 a^{4} {\mathrm e}^{2 i \left (f x +e \right )}+20 a^{3} b \,{\mathrm e}^{2 i \left (f x +e \right )}-4 \,{\mathrm e}^{2 i \left (f x +e \right )} b^{2} a^{2}-74 a \,b^{3} {\mathrm e}^{2 i \left (f x +e \right )}+60 b^{4} {\mathrm e}^{2 i \left (f x +e \right )}+8 a^{4}-12 a^{3} b -12 a^{2} b^{2}+31 a \,b^{3}-15 b^{4}\right )}{3 f \,a^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left (a -b \right )^{2} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}-b \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a -b \right )}+\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{3} \left (a -b \right )^{2} f}-\frac {5 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}-\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{3} \left (a -b \right )^{2} f}+\frac {5 \sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{4} \left (a -b \right )^{2} f}\) |
\(644\) |
| | |
|
|
|
[In]
int(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x,method=_RETURNVERBOSE)
[Out]
1/f*(1/(a-b)^2*arctan(tan(f*x+e))-b^3/a^3/(a-b)^2*((1/2*a-1/2*b)*tan(f*x+e)/(a+b*tan(f*x+e)^2)+1/2*(7*a-5*b)/(
a*b)^(1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2)))-1/3/a^2/tan(f*x+e)^3-(-2*b-a)/a^3/tan(f*x+e))
Fricas [A] (verification not implemented)
none
Time = 0.32 (sec) , antiderivative size = 596, normalized size of antiderivative = 3.53
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\left [\frac {24 \, a^{3} b f x \tan \left (f x + e\right )^{5} + 24 \, a^{4} f x \tan \left (f x + e\right )^{3} + 12 \, {\left (2 \, a^{3} b - 7 \, a b^{3} + 5 \, b^{4}\right )} \tan \left (f x + e\right )^{4} - 8 \, a^{4} + 16 \, a^{3} b - 8 \, a^{2} b^{2} + 8 \, {\left (3 \, a^{4} - a^{3} b - 7 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (7 \, a b^{3} - 5 \, b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (7 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} + 4 \, {\left (a b \tan \left (f x + e\right )^{3} - a^{2} \tan \left (f x + e\right )\right )} \sqrt {-\frac {b}{a}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right )}{24 \, {\left ({\left (a^{5} b - 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} f \tan \left (f x + e\right )^{3}\right )}}, \frac {12 \, a^{3} b f x \tan \left (f x + e\right )^{5} + 12 \, a^{4} f x \tan \left (f x + e\right )^{3} + 6 \, {\left (2 \, a^{3} b - 7 \, a b^{3} + 5 \, b^{4}\right )} \tan \left (f x + e\right )^{4} - 4 \, a^{4} + 8 \, a^{3} b - 4 \, a^{2} b^{2} + 4 \, {\left (3 \, a^{4} - a^{3} b - 7 \, a^{2} b^{2} + 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{2} - 3 \, {\left ({\left (7 \, a b^{3} - 5 \, b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (7 \, a^{2} b^{2} - 5 \, a b^{3}\right )} \tan \left (f x + e\right )^{3}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {b}{a}}}{2 \, b \tan \left (f x + e\right )}\right )}{12 \, {\left ({\left (a^{5} b - 2 \, a^{4} b^{2} + a^{3} b^{3}\right )} f \tan \left (f x + e\right )^{5} + {\left (a^{6} - 2 \, a^{5} b + a^{4} b^{2}\right )} f \tan \left (f x + e\right )^{3}\right )}}\right ]
\]
[In]
integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="fricas")
[Out]
[1/24*(24*a^3*b*f*x*tan(f*x + e)^5 + 24*a^4*f*x*tan(f*x + e)^3 + 12*(2*a^3*b - 7*a*b^3 + 5*b^4)*tan(f*x + e)^4
- 8*a^4 + 16*a^3*b - 8*a^2*b^2 + 8*(3*a^4 - a^3*b - 7*a^2*b^2 + 5*a*b^3)*tan(f*x + e)^2 - 3*((7*a*b^3 - 5*b^4
)*tan(f*x + e)^5 + (7*a^2*b^2 - 5*a*b^3)*tan(f*x + e)^3)*sqrt(-b/a)*log((b^2*tan(f*x + e)^4 - 6*a*b*tan(f*x +
e)^2 + a^2 + 4*(a*b*tan(f*x + e)^3 - a^2*tan(f*x + e))*sqrt(-b/a))/(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2
+ a^2)))/((a^5*b - 2*a^4*b^2 + a^3*b^3)*f*tan(f*x + e)^5 + (a^6 - 2*a^5*b + a^4*b^2)*f*tan(f*x + e)^3), 1/12*(
12*a^3*b*f*x*tan(f*x + e)^5 + 12*a^4*f*x*tan(f*x + e)^3 + 6*(2*a^3*b - 7*a*b^3 + 5*b^4)*tan(f*x + e)^4 - 4*a^4
+ 8*a^3*b - 4*a^2*b^2 + 4*(3*a^4 - a^3*b - 7*a^2*b^2 + 5*a*b^3)*tan(f*x + e)^2 - 3*((7*a*b^3 - 5*b^4)*tan(f*x
+ e)^5 + (7*a^2*b^2 - 5*a*b^3)*tan(f*x + e)^3)*sqrt(b/a)*arctan(1/2*(b*tan(f*x + e)^2 - a)*sqrt(b/a)/(b*tan(f
*x + e))))/((a^5*b - 2*a^4*b^2 + a^3*b^3)*f*tan(f*x + e)^5 + (a^6 - 2*a^5*b + a^4*b^2)*f*tan(f*x + e)^3)]
Sympy [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 4151 vs. \(2 (136) = 272\).
Time = 175.37 (sec) , antiderivative size = 4151, normalized size of antiderivative = 24.56
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Too large to display}
\]
[In]
integrate(cot(f*x+e)**4/(a+b*tan(f*x+e)**2)**2,x)
[Out]
Piecewise((zoo*x, Eq(a, 0) & Eq(b, 0) & Eq(e, 0) & Eq(f, 0)), ((x - cot(e + f*x)**3/(3*f) + cot(e + f*x)/f)/a*
*2, Eq(b, 0)), ((x + 1/(f*tan(e + f*x)) - 1/(3*f*tan(e + f*x)**3) + 1/(5*f*tan(e + f*x)**5) - 1/(7*f*tan(e + f
*x)**7))/b**2, Eq(a, 0)), (105*f*x*tan(e + f*x)**7/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24
*b**2*f*tan(e + f*x)**3) + 210*f*x*tan(e + f*x)**5/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24
*b**2*f*tan(e + f*x)**3) + 105*f*x*tan(e + f*x)**3/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24
*b**2*f*tan(e + f*x)**3) + 105*tan(e + f*x)**6/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24*b**
2*f*tan(e + f*x)**3) + 175*tan(e + f*x)**4/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24*b**2*f*
tan(e + f*x)**3) + 56*tan(e + f*x)**2/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24*b**2*f*tan(e
+ f*x)**3) - 8/(24*b**2*f*tan(e + f*x)**7 + 48*b**2*f*tan(e + f*x)**5 + 24*b**2*f*tan(e + f*x)**3), Eq(a, b))
, (zoo*x/a**2, Eq(e, -f*x)), (x*cot(e)**4/(a + b*tan(e)**2)**2, Eq(f, 0)), (12*a**4*f*x*sqrt(-a/b)*tan(e + f*x
)**3/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*t
an(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a*
*3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 12*a**4*sqrt(-a/b)*tan(e + f*x)**2/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)*
*3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/
b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) -
4*a**4*sqrt(-a/b)/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f
*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*
x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 12*a**3*b*f*x*sqrt(-a/b)*tan(e + f*x)**5/(12*a**6*f*sqrt(
-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a
**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*
tan(e + f*x)**5) + 12*a**3*b*sqrt(-a/b)*tan(e + f*x)**4/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sq
rt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5
+ 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) - 4*a**3*b*sqrt(-a/b)
*tan(e + f*x)**2/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*
sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x
)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 8*a**3*b*sqrt(-a/b)/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3
+ 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*
tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) - 28*
a**2*b**2*sqrt(-a/b)*tan(e + f*x)**2/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*
x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sq
rt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) - 4*a**2*b**2*sqrt(-a/b)/(12*a**6*f*sqrt
(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*
a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)
*tan(e + f*x)**5) - 21*a**2*b**2*log(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**3/(12*a**6*f*sqrt(-a/b)*tan(e +
f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sq
rt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)*
*5) + 21*a**2*b**2*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**3/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a
**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e
+ f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) - 42*a*b**3
*sqrt(-a/b)*tan(e + f*x)**4/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 2
4*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*
tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 20*a*b**3*sqrt(-a/b)*tan(e + f*x)**2/(12*a**6*f
*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3
- 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(
-a/b)*tan(e + f*x)**5) - 21*a*b**3*log(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**5/(12*a**6*f*sqrt(-a/b)*tan(e
+ f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*
sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x
)**5) + 15*a*b**3*log(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**3/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a
**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e
+ f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 21*a*b**3
*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**5/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)
*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**
4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) - 15*a*b**3*log(sqrt(-a/b) +
tan(e + f*x))*tan(e + f*x)**3/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 -
24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b
)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5) + 30*b**4*sqrt(-a/b)*tan(e + f*x)**4/(12*a**6*f
*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3
- 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(
-a/b)*tan(e + f*x)**5) + 15*b**4*log(-sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**5/(12*a**6*f*sqrt(-a/b)*tan(e +
f*x)**3 + 12*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sq
rt(-a/b)*tan(e + f*x)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)*
*5) - 15*b**4*log(sqrt(-a/b) + tan(e + f*x))*tan(e + f*x)**5/(12*a**6*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**5*b
*f*sqrt(-a/b)*tan(e + f*x)**5 - 24*a**5*b*f*sqrt(-a/b)*tan(e + f*x)**3 - 24*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x
)**5 + 12*a**4*b**2*f*sqrt(-a/b)*tan(e + f*x)**3 + 12*a**3*b**3*f*sqrt(-a/b)*tan(e + f*x)**5), True))
Maxima [A] (verification not implemented)
none
Time = 0.31 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.14
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (7 \, a b^{3} - 5 \, b^{4}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b}} - \frac {3 \, {\left (2 \, a^{2} b + 2 \, a b^{2} - 5 \, b^{3}\right )} \tan \left (f x + e\right )^{4} - 2 \, a^{3} + 2 \, a^{2} b + 2 \, {\left (3 \, a^{3} + 2 \, a^{2} b - 5 \, a b^{2}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{4} b - a^{3} b^{2}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{5} - a^{4} b\right )} \tan \left (f x + e\right )^{3}} - \frac {6 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}}}{6 \, f}
\]
[In]
integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="maxima")
[Out]
-1/6*(3*(7*a*b^3 - 5*b^4)*arctan(b*tan(f*x + e)/sqrt(a*b))/((a^5 - 2*a^4*b + a^3*b^2)*sqrt(a*b)) - (3*(2*a^2*b
+ 2*a*b^2 - 5*b^3)*tan(f*x + e)^4 - 2*a^3 + 2*a^2*b + 2*(3*a^3 + 2*a^2*b - 5*a*b^2)*tan(f*x + e)^2)/((a^4*b -
a^3*b^2)*tan(f*x + e)^5 + (a^5 - a^4*b)*tan(f*x + e)^3) - 6*(f*x + e)/(a^2 - 2*a*b + b^2))/f
Giac [A] (verification not implemented)
none
Time = 1.11 (sec) , antiderivative size = 171, normalized size of antiderivative = 1.01
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, b^{3} \tan \left (f x + e\right )}{{\left (a^{4} - a^{3} b\right )} {\left (b \tan \left (f x + e\right )^{2} + a\right )}} + \frac {3 \, {\left (7 \, a b^{3} - 5 \, b^{4}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{5} - 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt {a b}} - \frac {6 \, {\left (f x + e\right )}}{a^{2} - 2 \, a b + b^{2}} - \frac {2 \, {\left (3 \, a \tan \left (f x + e\right )^{2} + 6 \, b \tan \left (f x + e\right )^{2} - a\right )}}{a^{3} \tan \left (f x + e\right )^{3}}}{6 \, f}
\]
[In]
integrate(cot(f*x+e)^4/(a+b*tan(f*x+e)^2)^2,x, algorithm="giac")
[Out]
-1/6*(3*b^3*tan(f*x + e)/((a^4 - a^3*b)*(b*tan(f*x + e)^2 + a)) + 3*(7*a*b^3 - 5*b^4)*(pi*floor((f*x + e)/pi +
1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b)))/((a^5 - 2*a^4*b + a^3*b^2)*sqrt(a*b)) - 6*(f*x + e)/(a^2 - 2*
a*b + b^2) - 2*(3*a*tan(f*x + e)^2 + 6*b*tan(f*x + e)^2 - a)/(a^3*tan(f*x + e)^3))/f
Mupad [B] (verification not implemented)
Time = 14.48 (sec) , antiderivative size = 2000, normalized size of antiderivative = 11.83
\[
\int \frac {\cot ^4(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^2} \, dx=\text {Too large to display}
\]
[In]
int(cot(e + f*x)^4/(a + b*tan(e + f*x)^2)^2,x)
[Out]
(2*atan((2*tan(e + f*x)*(2320*a^10*b^11 - 400*a^9*b^12 - 5344*a^11*b^10 + 6112*a^12*b^9 - 3472*a^13*b^8 + 784*
a^14*b^7 - 64*a^15*b^6 + 192*a^16*b^5 - 192*a^17*b^4 + 64*a^18*b^3 + (256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^1
7*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2)/(2*a^2 - 4*a*b + 2*b^2)^
2))/((2*a^2 - 4*a*b + 2*b^2)*((2*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b^8 + 6208*a^16*b
^7 - 3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2))/(2*a^2 - 4*a*b + 2*b^2)^2 -
400*a^9*b^10 + 1520*a^10*b^9 - 1904*a^11*b^8 + 624*a^12*b^7 + 384*a^13*b^6 - 224*a^14*b^5))))/(f*(2*a^2 - 4*a
*b + 2*b^2)) + ((tan(e + f*x)^2*(3*a + 5*b))/(3*a^2) - 1/(3*a) + (tan(e + f*x)^4*(2*a*b^2 + 2*a^2*b - 5*b^3))/
(2*a^3*(a - b)))/(f*(a*tan(e + f*x)^3 + b*tan(e + f*x)^5)) + (atan((((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b
^11 + 5344*a^11*b^10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^
4 - 64*a^18*b^3) + ((7*a - 5*b)*(-a^7*b^5)^(1/2)*(2048*a^13*b^10 - 320*a^12*b^11 - 5440*a^14*b^9 + 7680*a^15*b
^8 - 6208*a^16*b^7 + 3200*a^17*b^6 - 1728*a^18*b^5 + 1280*a^19*b^4 - 640*a^20*b^3 + 128*a^21*b^2 + (tan(e + f*
x)*(7*a - 5*b)*(-a^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5
- 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)
))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(4*(a^9 - 2*a^8*b + a^7*b^2)) + ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b
^11 + 5344*a^11*b^10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^
4 - 64*a^18*b^3) + ((7*a - 5*b)*(-a^7*b^5)^(1/2)*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b
^8 + 6208*a^16*b^7 - 3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2 + (tan(e + f*
x)*(7*a - 5*b)*(-a^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5
- 3584*a^21*b^4 + 1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)
))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(4*(a^9 - 2*a^8*b + a^7*b^2)))/(400*a^9*b^10 - 1520*a^10*b^9 + 1904*a^11*b
^8 - 624*a^12*b^7 - 384*a^13*b^6 + 224*a^14*b^5 - ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b^11 + 5344*a^11*b^
10 - 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^4 - 64*a^18*b^3) +
((7*a - 5*b)*(-a^7*b^5)^(1/2)*(2048*a^13*b^10 - 320*a^12*b^11 - 5440*a^14*b^9 + 7680*a^15*b^8 - 6208*a^16*b^7
+ 3200*a^17*b^6 - 1728*a^18*b^5 + 1280*a^19*b^4 - 640*a^20*b^3 + 128*a^21*b^2 + (tan(e + f*x)*(7*a - 5*b)*(-a
^7*b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 +
1536*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)))*(7*a - 5*b)*(-a
^7*b^5)^(1/2))/(4*(a^9 - 2*a^8*b + a^7*b^2)) + ((tan(e + f*x)*(400*a^9*b^12 - 2320*a^10*b^11 + 5344*a^11*b^10
- 6112*a^12*b^9 + 3472*a^13*b^8 - 784*a^14*b^7 + 64*a^15*b^6 - 192*a^16*b^5 + 192*a^17*b^4 - 64*a^18*b^3) + ((
7*a - 5*b)*(-a^7*b^5)^(1/2)*(320*a^12*b^11 - 2048*a^13*b^10 + 5440*a^14*b^9 - 7680*a^15*b^8 + 6208*a^16*b^7 -
3200*a^17*b^6 + 1728*a^18*b^5 - 1280*a^19*b^4 + 640*a^20*b^3 - 128*a^21*b^2 + (tan(e + f*x)*(7*a - 5*b)*(-a^7*
b^5)^(1/2)*(256*a^15*b^10 - 1536*a^16*b^9 + 3584*a^17*b^8 - 3584*a^18*b^7 + 3584*a^20*b^5 - 3584*a^21*b^4 + 15
36*a^22*b^3 - 256*a^23*b^2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))/(4*(a^9 - 2*a^8*b + a^7*b^2)))*(7*a - 5*b)*(-a^7*
b^5)^(1/2))/(4*(a^9 - 2*a^8*b + a^7*b^2))))*(7*a - 5*b)*(-a^7*b^5)^(1/2)*1i)/(2*f*(a^9 - 2*a^8*b + a^7*b^2))